@import "../../styles/variables.scss";
$iconSize: 16px;
.lf-timeline {
  list-style: none;
  font-size: 16px;
  padding: 0;
  margin: 0;
  width: 100%;
  .lf-timeline-item {
    margin: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
    box-sizing: border-box;
    .lf-timeline-item-left,
    .lf-timeline-item-right {
      overflow: hidden;
      //   white-space: wrap;
      word-break: break-all;
      padding: 10px;
      //   box-sizing: border-box;
      display: flex;
      align-items: center;
      font-size: 14px;
    }
    .lf-timeline-item-left {
      justify-content: flex-end;
    }
    .lf-timeline-item-right {
      justify-content: flex-start;
    }

    .lf-timeline-item-icon {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      .lf-timeline-item-icon-default {
        height: $iconSize;
        width: $iconSize;
        border: var(--timeline-default-icon-border--);
        border-radius: 50%;
        box-sizing: border-box;
      }
      .lf-timeline-item-icon-success {
        height: $iconSize;
        color: var(--timeline-icon-success--);
        border-radius: 50%;
        line-height: 0;
      }
      .lf-timeline-item-icon-error {
        height: $iconSize;
        color: var(--timeline-icon-error--);
        border-radius: 50%;
        line-height: 0;
      }
      .lf-timeline-item-icon-warning {
        height: $iconSize;
        color: var(--timeline-icon-warning--);
        border-radius: 50%;
        line-height: 0;
      }
      div[class^="lf-timeline-item-icon-"] {
        margin: 2px 20px;
      }
      .lf-timeline-item-icon-loading {
        .timeline-loading {
          height: $iconSize;
          width: $iconSize;
          border: 1px solid var(--timeline-icon-loading--);
          border-radius: 50%;
          position: relative;
          animation: clock 2s ease-in-out infinite;
          &::after,
          &::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 2px;
            border-radius: 2px;
            transform-origin: 50% calc(100% - 1px);
            background: var(--timeline-icon-loading--);
          }
          &::after {
            height: 2 * $iconSize/7;
            animation: clock-hour 4s linear infinite;
          }
          &::before {
            height: 3 * $iconSize/7;
            animation: clock-minute 2s linear infinite;
          }
        }
      }
      &::after {
        content: "";
        display: block;
        bottom: 0;
        width: 2px;
        background: var(--timeline-icon-line--);

        flex-grow: 1;
      }
      &::before {
        content: "";
        display: block;
        bottom: 0;
        width: 2px;
        background: var(--timeline-icon-line--);
        flex-grow: 1;
      }
    }
  }
}
@keyframes clock {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes clock-minute {
  0% {
    transform: translate(-50%, calc(-100% + 1px)) rotate(0deg);
  }
  50% {
    transform: translate(-50%, calc(-100% + 1px)) rotate(180deg);
  }
  100% {
    transform: translate(-50%, calc(-100% + 1px)) rotate(360deg);
  }
}
@keyframes clock-hour {
  0% {
    transform: translate(-50%, calc(-100% + 1px)) rotate(0deg);
  }
  50% {
    transform: translate(-50%, calc(-100% + 1px)) rotate(180deg);
  }
  100% {
    transform: translate(-50%, calc(-100% + 1px)) rotate(360deg);
  }
}
